import http from './http'

export const getBlogList  = () => {
    const path = 'blog/'
    return http.get(path)
}
export const getBlogDetail  = (pk) => {
    const path = 'blog/' + pk+ '/'
    console.log(path)
    return http.get(path)
}
export const SubmitComment  = (pk,data) => {
    const path = 'blog/' + pk+ '/comments/'
    return http.post(path,data)
}
export const GetBlogCategory  = () => {
    const path = 'blogcategory/'
    return http.get(path)
}
export const SubmitBlog  = (data) => {
    const path = 'blog/'
    return http.post(path,data)
}
// 导出所有方法
export default {
    getBlogList,
    getBlogDetail,
    SubmitComment,
    GetBlogCategory,
    SubmitBlog
}